package com.example.dataservice.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;



@AllArgsConstructor
@NoArgsConstructor
@Data
public class Result<T>  {
	private T data;
	private boolean success;
	private String message;
	private Long cnt;
	public static <T> Result<T> success(T data) {
		return new Result<T>(data, true, "success",null);
	}
	public static <T> Result<T> success(T data,Long cnt) {
		return new Result<T>(data, true, "success",cnt);
	}
	public static <T> Result<T> fail(String message){
		return new Result<T>(null, false, message,null);
	}
}
